package com.wlf.spring.aware;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class MyBean  implements BeanNameAware , ApplicationContextAware {


    @Override
    public void setBeanName(String name) {
        System.out.println("bean 名字：" + name);
    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        System.out.println("容器：" + applicationContext);
    }
}
